﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//计算第几周，2022年02月21日 星期一 16:07:39。

namespace wd_2
{
    class Program
    {
        static void Main(string[] args)
        {
            int nn = WeekOfYear(DateTime.Now, new CultureInfo("zh-CN"));
            int nn1 = nn;
            Console.WriteLine("this week is the {0}th week of the year.", nn);
            // 输入
            Console.ReadLine();
        }

        public static int WeekOfYear(DateTime dt, CultureInfo ci)
        {
            return ci.Calendar.GetWeekOfYear(dt, ci.DateTimeFormat.CalendarWeekRule, 
                ci.DateTimeFormat.FirstDayOfWeek);
        }
    }
}
